program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, b, c, n, num: integer;

begin
  num:= 0;
  read (a, b, c, n);
  if n mod a = 0 then
    inc (num);
  if n mod b = 0 then
    inc (num);
  if n mod c = 0 then
    inc (num);
  if num = 2 then
    write ('YES')
  else
    write ('NO');
end.
